<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1{
      width: 300px;
      height: 300px;
      background-color: #f00;
    }
    .box2{
      width: 200px;
      height: 200px;
      background-color: #0f0;
    }
    .box3{
      width: 100px;
      height: 100px;
      background-color: #00f;
    }
  </style>
</head>
<body>
  <div id="app">
    <div class="box1" @click.once="fun1">
      <div class="box2" @click.once="fun2">
        <div class="box3" @click.once="fun3"></div>
      </div>
    </div>
  </div>
  <script src="../Dev-tools/vue.js"></script>
  <script>
    // 事件修饰符：
    // .stop:阻止事件冒泡
    // .once:只触发一次事件
    new Vue({
      methods:{
        fun1(){
          console.log("我是box1")
        },
        fun2(){
          console.log("我是box2")
        },
        fun3(){
          console.log("我是box3")
        }
      }
    }).$mount("#app")
  </script>
</body>
</html>